/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import javax.swing.JOptionPane;
import view.jPanels.CadBem;
import view.jPanels.CadFornecedor;
import view.jPanels.CadMovimentacao;
import view.jPanels.CadNotaFiscal;
import view.jPanels.CadPlaqueta;
import view.jPanels.CadPredio;
import view.jPanels.CadResponsavel;
import view.jPanels.CadSala;
import view.jPanels.CadUsuario;
import view.jPanels.RUDBem;
import view.jPanels.RUDFornecedor;
import view.jPanels.RUDMovimentacao;
import view.jPanels.RUDNotaFiscal;
import view.jPanels.RUDPlaqueta;
import view.jPanels.RUDPredio;
import view.jPanels.RUDResponsavel;
import view.jPanels.RUDSala;
import view.jPanels.RUDUsuario;

/**
 *
 * @author Gean
 */
public class Inicio extends javax.swing.JFrame {

    private int contadorBem=0;
    private int contadorFornec=0;
    private int contadorMov=0;
    private int contadorNF=0;
    private int contadorPlaq=0;
    private int contadorPredio=0;
    private int contadorResp=0;
    private int contadorSala=0;
    private int contadorUsuario=0;
    
    private int contadorConsBem=0;
    private int contadorConsFornec=0;
    private int contadorConsMov=0;
    private int contadorConsNF=0;
    private int contadorConsPlaq=0;
    private int contadorConsPredio=0;
    private int contadorConsResp=0;
    private int contadorConsSala=0;
    private int contadorConsUsuario=0;
    
    /**
     * Creates new form Inicio
     */
    public Inicio() {
        initComponents();
        setLayout(null);
        setVisible(true);
        setLocationRelativeTo(null);
        setTitle("Controle de Patrimonio");
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenuCad = new javax.swing.JMenu();
        jMenuBem = new javax.swing.JMenuItem();
        jMenuFornec = new javax.swing.JMenuItem();
        jMenuNF = new javax.swing.JMenuItem();
        jMenuPlaq = new javax.swing.JMenuItem();
        jMenuPredio = new javax.swing.JMenuItem();
        jMenuResp = new javax.swing.JMenuItem();
        jMenuSala = new javax.swing.JMenuItem();
        jMenuUser = new javax.swing.JMenuItem();
        jMenuCons = new javax.swing.JMenu();
        jMenuConsBem = new javax.swing.JMenuItem();
        jMenuConsFornec = new javax.swing.JMenuItem();
        jMenuConsMov = new javax.swing.JMenuItem();
        jMenuConsNF = new javax.swing.JMenuItem();
        jMenuConsPlaq = new javax.swing.JMenuItem();
        jMenuConsPred = new javax.swing.JMenuItem();
        jMenuConsResp = new javax.swing.JMenuItem();
        jMenuConsSala = new javax.swing.JMenuItem();
        jMenuConsUsuario = new javax.swing.JMenuItem();
        jMenuMov = new javax.swing.JMenu();
        jMenuMovIniciar = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jMenuCad.setMnemonic('1');
        jMenuCad.setText("Cadastros");

        jMenuBem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1, 0));
        jMenuBem.setText("Bem Patrimonial");
        jMenuBem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuBemActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuBem);

        jMenuFornec.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2, 0));
        jMenuFornec.setText("Fornecedor");
        jMenuFornec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuFornecActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuFornec);

        jMenuNF.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3, 0));
        jMenuNF.setText("Nota Fiscal");
        jMenuNF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuNFActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuNF);

        jMenuPlaq.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4, 0));
        jMenuPlaq.setText("Plaqueta");
        jMenuPlaq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuPlaqActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuPlaq);

        jMenuPredio.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5, 0));
        jMenuPredio.setText("Predio");
        jMenuPredio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuPredioActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuPredio);

        jMenuResp.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6, 0));
        jMenuResp.setText("Responsável");
        jMenuResp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuRespActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuResp);

        jMenuSala.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_7, 0));
        jMenuSala.setText("Sala");
        jMenuSala.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuSalaActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuSala);

        jMenuUser.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_8, 0));
        jMenuUser.setText("Usuário");
        jMenuUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuUserActionPerformed(evt);
            }
        });
        jMenuCad.add(jMenuUser);

        jMenuBar1.add(jMenuCad);

        jMenuCons.setMnemonic('2');
        jMenuCons.setText("Consultas");

        jMenuConsBem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1, 0));
        jMenuConsBem.setText("Bem Patrimonial");
        jMenuConsBem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsBemActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsBem);

        jMenuConsFornec.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2, 0));
        jMenuConsFornec.setText("Fornecedor");
        jMenuConsFornec.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsFornecActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsFornec);

        jMenuConsMov.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3, 0));
        jMenuConsMov.setText("Movimentação");
        jMenuConsMov.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsMovActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsMov);

        jMenuConsNF.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4, 0));
        jMenuConsNF.setText("Nota Fiscal");
        jMenuConsNF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsNFActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsNF);

        jMenuConsPlaq.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5, 0));
        jMenuConsPlaq.setText("Plaqueta");
        jMenuConsPlaq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsPlaqActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsPlaq);

        jMenuConsPred.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6, 0));
        jMenuConsPred.setText("Predio");
        jMenuConsPred.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsPredActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsPred);

        jMenuConsResp.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_7, 0));
        jMenuConsResp.setText("Responsável");
        jMenuConsResp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsRespActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsResp);

        jMenuConsSala.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_8, 0));
        jMenuConsSala.setText("Sala");
        jMenuConsSala.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsSalaActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsSala);

        jMenuConsUsuario.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_9, 0));
        jMenuConsUsuario.setText("Usuário");
        jMenuConsUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuConsUsuarioActionPerformed(evt);
            }
        });
        jMenuCons.add(jMenuConsUsuario);

        jMenuBar1.add(jMenuCons);

        jMenuMov.setMnemonic('3');
        jMenuMov.setText("Realizar Movimentação");
        jMenuMov.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuMovActionPerformed(evt);
            }
        });

        jMenuMovIniciar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1, 0));
        jMenuMovIniciar.setText("Iniciar");
        jMenuMovIniciar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuMovIniciarActionPerformed(evt);
            }
        });
        jMenuMov.add(jMenuMovIniciar);

        jMenuBar1.add(jMenuMov);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1020, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuBemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuBemActionPerformed
        if(contadorBem == 0){
        CadBem bem = new CadBem(jTabbedPane1, this);
        bem.setVisible(true);
                
        jTabbedPane1.add("Bem Patrimonial", bem);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(bem));
        contadorBem++;
        } else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuBemActionPerformed

    private void jMenuPredioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuPredioActionPerformed
        if(contadorPredio == 0){
        CadPredio predio = new CadPredio(jTabbedPane1, this);
        predio.setVisible(true);
                
        jTabbedPane1.add("Predio", predio);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(predio));
        contadorPredio++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuPredioActionPerformed

    private void jMenuPlaqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuPlaqActionPerformed
        if(contadorPlaq == 0){
        CadPlaqueta plaq = new CadPlaqueta(jTabbedPane1, this);
        plaq.setVisible(true);
                
        jTabbedPane1.add("Plaqueta", plaq);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(plaq));
        contadorPlaq++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuPlaqActionPerformed

    private void jMenuUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuUserActionPerformed
        if(contadorUsuario == 0){
        CadUsuario user = new CadUsuario(jTabbedPane1, this);
        user.setVisible(true);
                
        jTabbedPane1.add("Usuário", user);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(user));
        contadorUsuario++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuUserActionPerformed

    private void jMenuRespActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuRespActionPerformed
        if(contadorResp == 0){
        CadResponsavel resp = new CadResponsavel(jTabbedPane1, this);
        resp.setVisible(true);
                
        jTabbedPane1.add("Responsável", resp);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(resp));
        contadorResp++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuRespActionPerformed

    private void jMenuConsNFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsNFActionPerformed
        if(contadorConsNF== 0){
        RUDNotaFiscal consNF = new RUDNotaFiscal(jTabbedPane1, this);
        consNF.setVisible(true);
                
        jTabbedPane1.add("Consulta Nota Fiscal", consNF);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consNF));
        contadorConsNF++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsNFActionPerformed

    private void jMenuFornecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuFornecActionPerformed
        if(contadorFornec == 0){
        CadFornecedor fornec = new CadFornecedor(jTabbedPane1, this);
        fornec.setVisible(true);
                
        jTabbedPane1.add("Fornecedor", fornec);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(fornec));
        contadorFornec++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuFornecActionPerformed

    private void jMenuNFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuNFActionPerformed
       if(contadorNF == 0){
        CadNotaFiscal notaFiscal = new CadNotaFiscal(jTabbedPane1, this);
        notaFiscal.setVisible(true);
                
        jTabbedPane1.add("Nota Fiscal", notaFiscal);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(notaFiscal));
        contadorNF++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuNFActionPerformed

    private void jMenuSalaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuSalaActionPerformed
        if(contadorSala == 0){
        CadSala sala = new CadSala(jTabbedPane1, this);
        sala.setVisible(true);
                
        jTabbedPane1.add("Sala", sala);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(sala));
        contadorSala++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuSalaActionPerformed

    private void jMenuConsBemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsBemActionPerformed
         if(contadorConsBem == 0){
        RUDBem consBem = new RUDBem(jTabbedPane1, this);
        consBem.setVisible(true);
                
        jTabbedPane1.add("Consulta Bem", consBem);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consBem));
        contadorConsBem++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsBemActionPerformed

    private void jMenuConsFornecActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsFornecActionPerformed
        if(contadorConsFornec == 0){
        RUDFornecedor consFornec = new RUDFornecedor(jTabbedPane1, this);
        consFornec.setVisible(true);
                
        jTabbedPane1.add("Consulta Fornecedor", consFornec);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consFornec));
        contadorConsFornec++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsFornecActionPerformed

    private void jMenuConsMovActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsMovActionPerformed
        if(contadorConsMov == 0){
        RUDMovimentacao consMov = new RUDMovimentacao(jTabbedPane1, this);
        consMov.setVisible(true);
                
        jTabbedPane1.add("Consulta Movimentação", consMov);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consMov));
        contadorConsMov++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsMovActionPerformed

    private void jMenuConsPlaqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsPlaqActionPerformed
        if(contadorConsPlaq == 0){
        RUDPlaqueta consPlaq = new RUDPlaqueta(jTabbedPane1, this);
        consPlaq.setVisible(true);
                
        jTabbedPane1.add("Consulta Plaqueta", consPlaq);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consPlaq));
        contadorConsPlaq++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsPlaqActionPerformed

    private void jMenuConsPredActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsPredActionPerformed
        if(contadorConsPredio == 0){
        RUDPredio consPredio = new RUDPredio(jTabbedPane1, this);
        consPredio.setVisible(true);
                
        jTabbedPane1.add("Consulta Predio", consPredio);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consPredio));
        contadorConsPredio++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsPredActionPerformed

    private void jMenuConsRespActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsRespActionPerformed
        if(contadorConsResp == 0){
        RUDResponsavel consResp = new RUDResponsavel(jTabbedPane1, this);
        consResp.setVisible(true);
                
        jTabbedPane1.add("Consulta Responsável", consResp);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consResp));
        contadorConsResp++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsRespActionPerformed

    private void jMenuConsSalaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsSalaActionPerformed
        if(contadorConsSala == 0){
        RUDSala consSala = new RUDSala(jTabbedPane1, this);
        consSala.setVisible(true);
                
        jTabbedPane1.add("Consulta Sala", consSala);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consSala));
        contadorConsSala++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsSalaActionPerformed

    private void jMenuConsUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuConsUsuarioActionPerformed
        if(contadorConsUsuario == 0){
        RUDUsuario consUser = new RUDUsuario(jTabbedPane1, this);
        consUser.setVisible(true);
                
        jTabbedPane1.add("Consulta Usuário", consUser);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(consUser));
        contadorConsUsuario++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuConsUsuarioActionPerformed

    private void jMenuMovActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuMovActionPerformed
        
    }//GEN-LAST:event_jMenuMovActionPerformed

    private void jMenuMovIniciarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuMovIniciarActionPerformed
        if(contadorMov == 0){
        CadMovimentacao cadMov = new CadMovimentacao(jTabbedPane1, this);
        cadMov.setVisible(true);
                
        jTabbedPane1.add("Movimentação", cadMov);
        jTabbedPane1.setVisible(true);
        jTabbedPane1.setSelectedIndex(jTabbedPane1.getComponentZOrder(cadMov));
        contadorMov++;
        }else{
            JOptionPane.showMessageDialog(this, "ESSA ABA JÁ FOI ABERTA!");
        }
    }//GEN-LAST:event_jMenuMovIniciarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Inicio.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Inicio().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuBem;
    private javax.swing.JMenu jMenuCad;
    private javax.swing.JMenu jMenuCons;
    private javax.swing.JMenuItem jMenuConsBem;
    private javax.swing.JMenuItem jMenuConsFornec;
    private javax.swing.JMenuItem jMenuConsMov;
    private javax.swing.JMenuItem jMenuConsNF;
    private javax.swing.JMenuItem jMenuConsPlaq;
    private javax.swing.JMenuItem jMenuConsPred;
    private javax.swing.JMenuItem jMenuConsResp;
    private javax.swing.JMenuItem jMenuConsSala;
    private javax.swing.JMenuItem jMenuConsUsuario;
    private javax.swing.JMenuItem jMenuFornec;
    private javax.swing.JMenu jMenuMov;
    private javax.swing.JMenuItem jMenuMovIniciar;
    private javax.swing.JMenuItem jMenuNF;
    private javax.swing.JMenuItem jMenuPlaq;
    private javax.swing.JMenuItem jMenuPredio;
    private javax.swing.JMenuItem jMenuResp;
    private javax.swing.JMenuItem jMenuSala;
    private javax.swing.JMenuItem jMenuUser;
    private javax.swing.JTabbedPane jTabbedPane1;
    // End of variables declaration//GEN-END:variables

// Contadores cad    
public int getContadorBem(){
    return contadorBem;
}

public void setContadorBem(int valor){
    this.contadorBem = valor;
}

public int getContadorFornec(){
    return contadorFornec;
}

public void setContadorFornec(int valor){
    this.contadorFornec = valor;
}

public int getContadorMov(){
    return contadorMov;
}

public void setContadorMov(int valor){
    this.contadorMov = valor;
}

public int getContadorNF(){
    return contadorNF;
}

public void setContadorNF(int valor){
    this.contadorNF = valor;
}

public int getContadorPlaq(){
    return contadorPlaq;
}

public void setContadorPlaq(int valor){
    this.contadorPlaq = valor;
}

public int getContadorPredio(){
    return contadorPredio;
}

public void setContadorPredio(int valor){
    this.contadorPredio = valor;
}

public int getContadorResp(){
    return contadorResp;
}

public void setContadorResp(int valor){
    this.contadorResp = valor;
}

public int getContadorSala(){
    return contadorSala;
}

public void setContadorSala(int valor){
    this.contadorSala = valor;
}

public int getContadorUsuario(){
    return contadorUsuario;
}

public void setContadorUsuario(int valor){
    this.contadorUsuario = valor;
}
//-------------------------------------------------------

//Contadores Consultas
public int getContadorConsBem(){
    return contadorConsBem;
}

public void setContadorConsBem(int valor){
    this.contadorConsBem = valor;
}

public int getContadorConsFornec(){
    return contadorConsFornec;
}

public void setContadorConsFornec(int valor){
    this.contadorConsFornec = valor;
}

public int getContadorConsMov(){
    return contadorConsMov;
}

public void setContadorConsMov(int valor){
    this.contadorConsMov = valor;
}

public int getContadorConsNF(){
    return contadorConsNF;
}

public void setContadorConsNF(int valor){
    this.contadorConsNF = valor;
}

public int getContadorConsPlaq(){
    return contadorConsPlaq;
}

public void setContadorConsPlaq(int valor){
    this.contadorConsPlaq = valor;
}

public int getContadorConsPredio(){
    return contadorConsPredio;
}

public void setContadorConsPredio(int valor){
    this.contadorConsPredio = valor;
}

public int getContadorConsResp(){
    return contadorConsResp;
}

public void setContadorConsResp(int valor){
    this.contadorConsResp = valor;
}

public int getContadorConsSala(){
    return contadorConsSala;
}

public void setContadorConsSala(int valor){
    this.contadorConsSala = valor;
}

public int getContadorConsUsuario(){
    return contadorConsUsuario;
}

public void setContadorConsUsuario(int valor){
    this.contadorConsUsuario = valor;
}
}
